package model

// StockCasbinRoleRelationResourcesModel 结构体
type StockCasbinRoleRelationResourcesModel struct {
	Id          int        `json:"id,omitempty" gorm:"column:id;isNullable:NO;"`
	RoleId      int        `json:"roleId,omitempty" gorm:"column:role_id;comment:角色ID;isNullable:NO;"`
	ResourceId  int        `json:"resourceId,omitempty" gorm:"column:resource_id;comment:接口资源唯一ID;isNullable:NO;"`
	Status      string     `json:"status,omitempty" gorm:"column:status;comment:状态 Y/N 正常/禁用;default:Y;isNullable:YES;size:10;"`
	CreateTime  *LocalTime `json:"createTime" gorm:"column:create_time;default:CURRENT_TIMESTAMP;isNullable:NO;"`
	LastUpdTime *LocalTime `json:"lastUpdTime" gorm:"column:last_upd_time;default:CURRENT_TIMESTAMP;isNullable:NO;"`
}

func NewStockCasbinRoleRelationResourcesModel() *StockCasbinRoleRelationResourcesModel {
	return &StockCasbinRoleRelationResourcesModel{}
}

// TableName StockCasbinRoleRelationResources 表名
func (a *StockCasbinRoleRelationResourcesModel) TableName() string {
	return "stock_casbin_role_relation_resources"
}
